#include "junix.h"

int main(int argc, char **argv)
{
	if (isatty(STDIN_FILENO) )
		printf("stdin is a tty\n");
	if (isatty(STDOUT_FILENO) )
		printf("stdout is a tty\n");
	if (isatty(STDERR_FILENO) )
		printf("stderr is a tty\n");

	printf("stdin name:%s\n", ttyname(STDIN_FILENO));
	printf("stdout name:%s\n", ttyname(STDOUT_FILENO));
	printf("stderr name:%s\n", ttyname(STDERR_FILENO));

    exit(0);
}

